<template>
	<view class="flex-col homepage" v-model="adds1">
		<view class="u-line-1 text">{{adds1.theTheme}}</view>
		<view class="u-line-1 text-two">{{adds1.theAuthor}} {{adds1.createTime}}</view>
		<view class="u-line-1 text-three">时间:{{adds1.startTime}}</view>
		<view class="u-line-1 text-four">地点:北工商东教学楼</view>
		<view class="u-line-1 text-five">具体时间:{{adds1.startTime}}—{{adds1.endTime}}</view>
		<view class="u-line-3 text-six">{{adds1.content}}</view>
		<view class="u-line-1 text-seven"></view>
	</view>
</template>
<script>
	export default {
		data() {
			return {
				adds1:{},
			}
		},
		onLoad(params) {
			this.adds1 = JSON.parse(params.j)
			console.log(this.adds1)
			this.adds1.startTime = this.formatDate(this.adds1.startTime)
			this.adds1.endTime = this.formatDate(this.adds1.endTime)
			
		},
		methods: {
			formatDate(value, spe = '-') {
				let data = new Date(value);
				let year = data.getFullYear();
				let month = data.getMonth() + 1;
				let day = data.getDate();
				month = month >= 10 ? month : "0" + month;
				day = day >= 10 ? day : "0" + day;
				return `${year}${spe}${month}${spe}${day}`;
			},
		}
	}
</script>
<style lang="scss" scoped>
	/** 全局样式-开始,建议放在公共css样式文件中,比如common.css 或app.vue文件 */

	html,
	body {
		margin: 0;
		width: 100%;
		height: 100%;
		font-size: 16px;
		
	}

	view,
	text,
	image {
		position: relative;
		box-sizing: border-box;
		flex-shrink: 0;
	}

	.flex-col {
		display: flex;
		align-items: flex-start;
		flex-direction: column;
	}

	.flex-row {
		display: flex;
		align-items: flex-start;
	}

	.flex-col .flex-row {
		width: 100%
	}

	/** 全局样式-结束*/

	.homepage {
		padding: 38rpx 0rpx 950rpx 40rpx;
		background-color: #dbf1e1;

		.text {
			width: 204rpx;
			margin: 0rpx 0rpx 28rpx 10rpx;
			font-size: 34rpx;
			font-weight: 600;
			color: rgba(119, 119, 119, 1);
		}

		.text-two {
			width: 258rpx;
			margin: 0rpx 0rpx 44rpx 10rpx;
			font-size: 26rpx;
			font-weight: 600;
			color: rgba(190, 190, 190, 1);
		}

		.text-three {
			width: 402rpx;
			margin: 0rpx 0rpx 16rpx 10rpx;
			font-size: 30rpx;
			font-weight: 600;
			color: rgba(115, 115, 115, 1);
		}

		.text-four {
			width: 356rpx;
			margin: 0rpx 0rpx 10rpx 10rpx;
			font-size: 30rpx;
			font-weight: 600;
			color: rgba(115, 115, 115, 1);
		}

		.text-five {
			width: 100%;
			margin: 0rpx 0rpx 78rpx 10rpx;
			font-size: 30rpx;
			font-weight: 600;
			color: rgba(115, 115, 115, 1);
		}

		.text-six {
			width: 664rpx;
			margin-bottom: 90rpx;
			margin: 0rpx 0rpx 78rpx 10rpx;
			font-size: 30rpx;
			font-weight: 600;
			color: rgba(89, 89, 89, 1);
		}

		.text-seven {
			width: 686rpx;
			font-size: 30rpx;
			font-weight: 600;
			color: rgba(115, 115, 115, 1);
		}
	}
</style>
